#pragma once

#include <vector>

#include "Player.h"

namespace Rorn
{
	namespace Chess
	{
		namespace TheCorruptRook
		{
			class MoveTreeNode;
			class Square;

			class Position
			{
			public:
				Position(void);
				~Position(void);

				void Reset();

				void GetLegalMoves(Player::Type player, std::vector<MoveTreeNode>& legalMoves, int depth) const;

				int GetPiece(Player::Type player, const Square& square) const;
				double CalculateScore(Player::Type player) const;

				void MovePiece(Player::Type player, const Square& startSquare, const Square& endSquare);
			private:
				double CalculateScoreOnePlayer(Player::Type player) const;

				char boardState_[8][8];// rank, file [a1->h8]
			};
		}
	}
}
